package com.example.spring_rabbit.constum;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author wangc
 * @date 2022/8/26 15:31
 */
@Component
public class workcustomer {

    @RabbitListener(queuesToDeclare = @Queue(value = "works"))
    public void re1(String mes) {
        System.out.println("2" + mes);
    }

    @RabbitListener(queuesToDeclare = @Queue(value = "works"))
    public void re2(String mes) {
        System.out.println("1" + mes);
    }


}
